# Import Events Data Quickly from Text File via URL Arguments

**URL:** https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564
**Category:** MusicBrainz
**Tags:** event
**Created:** [April 5, 2023, 10:54am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564 "2023-04-05T10:54:58Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 10:54am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/1 "2023-04-05T10:54:58Z")

</div>

So I’m not sure how to tackle this yet, but I would like some assistance if possible to help reduce time and increase the speed at which I can enter information.

I have been collecting various “advertisments” for events from magazines for a while now, and some of these can include many dates at different locations.

At the moment, I can of course, just add these into MusicBrainz one at a time, typing in the text manually but it’s a long process and my hands begin to hurt eventually.

My idea would be for me to input a lot of this data into some kind of text-file like a csv/JSON/XML which a script of some-sort could read through, and then insert into the MBz Event submission form/create a URL with arguments with the values mostly (if not all) pre-populated, allow me to check all is good and hit the submit button.

Here’s an example of an advertisment with many dates:

 ![image](https://community.metabrainz.org/uploads/default/original/3X/f/7/f70014fef6ac6f8dab92b8dda9ee49d786f1828d.jpeg)

I know that when you’re on an artist page you can click Add Event URL and the URL is formed like this:  
[https://beta.musicbrainz.org/event/create?rels.0.target=e0195400-ad63-4a21-8d56-9a96647cb24e](https://beta.musicbrainz.org/event/create?rels.0.target=e0195400-ad63-4a21-8d56-9a96647cb24e)

This pre-populates the linked artist (you just need to then choose the relationship)… but I am wondering if there are more things I can add to this URL to populate things like the Name, Type, Date and Location?

Many thanks in advance

---

<div class="post-metadata">

### Author: ![kellnerd](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kellnerd/32/66963_2.png) [@kellnerd](https://community.metabrainz.org/u/kellnerd)
#### Post date: [April 5, 2023, 11:11am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/2 "2023-04-05T11:11:41Z")

</div>

> [@sound.and.vision](#):
>
> I am wondering if there are more things I can add to this URL to populate things like the Name, Type, Date and Location?

Yes, you can: [Log in - MusicBrainz](https://beta.musicbrainz.org/event/create?rels.0.target=e0195400-ad63-4a21-8d56-9a96647cb24e&rels.0.type=798&edit-event.name=Test&edit-event.type_id=1&edit-event.setlist=test&edit-event.period.begin_date.month=10&edit-event.period.begin_date.day=21)

It is possible to seed all fields of all entity types’ editing forms, yambs does support artist, labels, releases, recordings and works so far:

> **[yambs](https://yambs.erat.org/#source=text)**

You could ask @derat to add support for seeding events if you don’t want to build these URLs by hand 🙂

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [April 5, 2023, 11:27am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/3 "2023-04-05T11:27:13Z")

</div>

If you are adding details from an advert like that, I would also (approx) date of the advert source when adding. Sometimes tour dates get rearranged\postponed so would be handy to note how far in advance the advert flyer was.

I had a tickets for gigs in 2020 which ended up happening in 2022…

---

<div class="post-metadata">

### Author: ![derat](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@derat](https://community.metabrainz.org/u/derat)
#### Post date: [April 5, 2023, 11:35am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/4 "2023-04-05T11:35:48Z")

</div>

> [@kellnerd](#):
>
> You could ask @derat to add support for seeding events if you don’t want to build these URLs by hand 🙂

Sure, that doesn’t seem too hard to add. I’ve filed [https://github.com/derat/yambs/issues/27](https://github.com/derat/yambs/issues/27); I’ll probably be able to look at this today or tomorrow.

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 12:45pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/5 "2023-04-05T12:45:15Z")

</div>

Thanks 😃 that would be suuuuuper duper helpful 😃

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 12:45pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/6 "2023-04-05T12:45:48Z")

</div>

A-ha thanks, is there a document that gives all of the field names (i.e. “edit-event.name”)?

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 12:47pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/7 "2023-04-05T12:47:01Z")

</div>

Yep I am aware of that problem. I will often go back and mark an event as cancelled if its date is marked as so in a later publication _or_ update the date if a revision is made.

Of course I am working here with very old data, so knowledge of such amendments will only come to light if someone bothered to make a record of it (sometimes it won’t be in the same publication, I’ve seen amendments listed in the daily/weekly local newspaper for example)

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [April 5, 2023, 12:53pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/8 "2023-04-05T12:53:25Z")

</div>

I assume you know this site: [WorldRadioHistory: Radio Music Electronics Publications ALL FREE](https://worldradiohistory.com/index.htm) I use that a lot for issues of [Music Week](https://worldradiohistory.com/Music_Week.htm). All kinds of gems on there.

One thing for the wish list - wouldn’t it be great if we could put these images on the CAA as part of the edit notes. Or even better if Events got the ability to include artwork like this.

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 12:57pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/9 "2023-04-05T12:57:43Z")

</div>

> [@IvanDobsky](#):
>
> I assume you know this site

I did not, and here I am being a mug and buying magazines (and also there’s a few music mags on Internet Archive [Smash Hits, Muzik] + Google Books)

> [@IvanDobsky](#):
>
> Or even better if Events got the ability to include artwork like this.

Yep, I’d love that, I think I mentioned it previously. The suggestion was to upload the advert/poster/flyer seperately and then just link it but it didn’t look very nice.

---

<div class="post-metadata">

### Author: ![kellnerd](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kellnerd/32/66963_2.png) [@kellnerd](https://community.metabrainz.org/u/kellnerd)
#### Post date: [April 5, 2023, 1:11pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/10 "2023-04-05T13:11:32Z")

</div>

> [@sound.and.vision](#):
>
> is there a document that gives all of the field names (i.e. “edit-event.name”)?

Not a real document, but once you have understood the basic principle, you can find the field names with the browser’s “Inspector” tool:

 ![Screenshot](https://community.metabrainz.org/uploads/default/original/3X/d/3/d35774f8bfa58c929f4840c798ebeb403e1c2fdf.png)

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 1:12pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/11 "2023-04-05T13:12:20Z")

</div>

Cool, thanks for the pointer!

---

<div class="post-metadata">

### Author: ![derat](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@derat](https://community.metabrainz.org/u/derat)
#### Post date: [April 5, 2023, 3:14pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/12 "2023-04-05T15:14:07Z")

</div>

> [@sound.and.vision](#):
>
> Thanks 😃 that would be suuuuuper duper helpful 😃

Sure thing! I think that this should be working now.

Here’s some example input that can be entered at [https://yambs.erat.org/#source=text&textFormat=csv&textType=event](https://yambs.erat.org/#source=text&textFormat=csv&textType=event) to seed two concerts for [MusicBrainz Test Artist](https://musicbrainz.org/artist/7e84f845-ac16-41fe-9ff8-df12eb32af55) with different places:

**Values to set on all entities:**

```txt
type=1
rel0_target=7e84f845-ac16-41fe-9ff8-df12eb32af55
rel0_type=798
rel1_type=794
edit_note=info copied from poster at https://example.org/foo

```

**Input fields:**

```txt
name,begin_date,end_date,time,rel1_target

```

**Input:**

```csv
Some Concert,2021-03-24,2021-03-24,20:00,8b162dca-51f0-40b3-860a-d109d5128c3c
Another Concert,2021-03-25,2004-03-25,21:00,f4fe8c21-2219-43e7-a9a7-db67b70c3404

```

Don’t hesitate to let me know if you run into problems or if it doesn’t make sense!

---

<div class="post-metadata">

### Author: ![IvanDobsky](https://community.metabrainz.org/user_avatar/community.metabrainz.org/ivandobsky/32/11785_2.png) [@IvanDobsky](https://community.metabrainz.org/u/IvanDobsky)
#### Post date: [April 5, 2023, 4:08pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/13 "2023-04-05T16:08:24Z")

</div>

> [@sound.and.vision](#):
>
> I did not, and here I am being a mug and buying magazines

I am constantly using [Music Week](https://worldradiohistory.com/Music_Week.htm) as it is UK industry press. So if you know the rough week somethings was released, you can find the table in there of “this week’s releases”. Or even better the write-ups and reviews.

The funny part I find is seeing the artists they missed… the ones who got huge but barely got a few lines at the time.

So you don’t want to know that old editions of [Melody Maker](https://worldradiohistory.com/Melody_Maker.htm) are on there… Far too much gig info in there. I downloaded a random issue which had some [scruffy people on the cover](https://worldradiohistory.com/UK/Melody-Maker/60s/67/Melody-Maker-1967-0909.pdf) doing a “Magical Mystery Tour”…

But online PDFs can never beat the feel and smell of real magazines…

---

<div class="post-metadata">

### Author: ![aerozol](https://community.metabrainz.org/user_avatar/community.metabrainz.org/aerozol/32/116_2.png) [@aerozol](https://community.metabrainz.org/u/aerozol)
#### Post date: [April 5, 2023, 8:31pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/14 "2023-04-05T20:31:37Z")

</div>

Oooh so excited to test out @derat’s importer!!

It looks like it doesn’t seed artists, which is probably the bulk of the work for events, or am I mistaken?

> [@IvanDobsky](#):
>
> if Events got the ability to include artwork like this.

Please feel free to bang this drum with me 😊

> <https://tickets.metabrainz.org/browse/CAA-84>

---

<div class="post-metadata">

### Author: ![sound.and.vision](https://community.metabrainz.org/user_avatar/community.metabrainz.org/sound.and.vision/32/35417_2.png) [@sound.and.vision](https://community.metabrainz.org/u/sound.and.vision)
#### Post date: [April 5, 2023, 8:34pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/15 "2023-04-05T20:34:09Z")

</div>

> [@aerozol](#):
>
> Please feel free to bang this drum with me 😊

17 votes and counting

> [@aerozol](#):
>
> Oooh so excited to test out @derat’s importer!!

it’s working well so far, just did 10 in the time it would probably take me to do 2.

> [@aerozol](#):
>
> It looks like it doesn’t seed artists, which is probably the bulk of the work for events, or am I mistaken?

I’m not sure exactly what needs to happen, but as I’m doing lots of events for the same artist my CSV just uses the MBID for their entity over and over 🙂

---

<div class="post-metadata">

### Author: ![derat](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/d/71c47a/32.png) [@derat](https://community.metabrainz.org/u/derat)
#### Post date: [April 5, 2023, 10:01pm UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/16 "2023-04-05T22:01:34Z")

</div>

> [@sound.and.vision](#):
>
> > [@aerozol](#):
> >
> > It looks like it doesn’t seed artists, which is probably the bulk of the work for events, or am I mistaken?
> 
> I’m not sure exactly what needs to happen, but as I’m doing lots of events for the same artist my CSV just uses the MBID for their entity over and over 🙂

Do you mean artist-to-event relationships like “main performer” or “support act”? Those seemed to be working in my limited testing (and it’s demonstrated in the example I posted above – I set a single relationship with the same artist for both events, but you could specify different relationships for each event instead). If you specify an artist name instead of an MBID, the search field will be seeded.

Let me know if there’s some other sort of artist seeding that I missed.

---

<div class="post-metadata">

### Author: ![aerozol](https://community.metabrainz.org/user_avatar/community.metabrainz.org/aerozol/32/116_2.png) [@aerozol](https://community.metabrainz.org/u/aerozol)
#### Post date: [April 6, 2023, 1:29am UTC](https://community.metabrainz.org/t/import-events-data-quickly-from-text-file-via-url-arguments/631564/17 "2023-04-06T01:29:29Z")

</div>

Thanks @derat, I’m traveling so I hadn’t actually tried yet, just looked at your examples! Impressed by your quick work on this 💪
