The New API - Same as the old API except for the differences

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#1  Edited By porkbun  Staff

http://api.comicvine.com

Changelog

  • [5.8.13] Fixed multi-field filter on list calls.
  • [5.8.13] Fixed role being outside the person credit set.
  • [4.2.13] Amend: issues was not taken out of volume; it was taken out of story_arcs.
  • [4.2.13] volume accepts multiple ids separated by a pipe for issues list call.
  • [4.2.13] issue_number in the issues list call is now filterable.
  • [4.2.13] The name returned in an issue call be the issue name.
  • [4.2.13] Any date field filter will behave like the cover_date and store_date filter below.
  • [3.29.13] To filter the cover_date and store_date fields. A single date (format: YYYY-MM-DD) is an exact match, Two dates separated by a pipe (format: YYYY-MM-DD|YYYY-MM-DD) returns an inclusive range from the first date to the second date.
  • [3.29.13] Added cover_date and store_date fields to issue resource call
  • [3.29.13] Removed publish_* fields from issue resource call
  • Removed fields from the following resource call:
    • movie: director, story_arc_credits
    • person: created_teams
    • team: creators, team_enemies, team_friends
    • story_arc: issues
  • The logic for video URLs will now follow these guidelines:
    • Non-premium API users gets low_url and high_url for non-premium videos.
    • Non-premium API users gets no video urls for premium videos.
    • Premium API users gets the low_url, high_url and the masked hd_url for every video.
  • Added version tag
  • Empty values will return null instead of an empty string
  • Added Youtube ID to video resource call
  • Use page instead of offset to paginate through search results; extended search limit to 100
  • Added sorting and filtering on the list resource calls; check out the docs for available fields. Filtering by words is greedy and case-sensitive. When filtering against ids, multiple ids can be separated by a pipe character. Example for sort and filter:
    • To sort issues by its store date descending: http://beta.comicvine.com/api/issues/?api_key=API_KEY&sort=store_date:desc
    • To filter for characters with the word Super in their name: http://beta.comicvine.com/api/characters/?api_key=API_KEY&filter=name:Super
  • Making a singular call will require the resource's type. Calling the types resource will provide a list of types for each resource. For example, to get the concept Marvel Noir, it would be: http://beta.comicvine.com/api/concept/4015-56150/?api_key=API_KEY
  • The site search accepts unicode characters so the API search call now accepts unicode characters.

What Is The Same...For Now

  • Singular resource call will still accept just an id, which means http://beta.comicvine.com/api/concept/56150?api_key=API_KEY will still work.
  • Added legacy support for the old sort and filter.
  • The above two will be removed in 2-3 months time.

What To Expect In The Present

Initially, the first resource calls will be slow and/or timeout due to the image resizing. But subsequent calls that return the same results will be faster.

A Look to the Future

Login support, CORS support, Reverse API, New Resources

When Will The FutureArrive?

Uh. Yeah.

Avatar image for anville
anville

14

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Just to clarify with regards to the singular resource requiring a the type, is it correct that the only difference is prepending the type ID onto the resource ID?

So, instead of this:

http://beta.comicvine.com/api/<singular_resource>/<resource_id>/?api_key=API_KEY

it should be this?:

http://beta.comicvine.com/api/<singular_resource>/<type_id>-<resource_id>/?api_key=API_KEY

Avatar image for anville
anville

14

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3  Edited By anville

Another question:

@frobie said:
  • Removed fields from the following resource call:
    • volume: issues

This seems to still exist, and is quite useful. If you do remove it, what is the recommended way to retrieve a list of issues by volume? There is no "volume_id" for the "issues" resource. If you add that, I hope that it will be possible to request all the fields from "issues" (plural) that we can from "issue" (singular).

It's exciting to have the API be actively developed! Thanks for all your work!

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I agree, having the list of issues on a volume is incredibly useful.

Also, could I inquire as to why the change was made to have the volume name/issue ID in with the title of the issue? It seems like a bunch of extraneous info for us to strip out when we just want the title of the issue...

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

+1 for please don't get rid of "volume/issues"...that information is extremely useful, in fact, I'm not sure how we would go about figuring out what issues are in a volume without it...!

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#6  Edited By porkbun  Staff

@anville@matthewlupo@cbanack Filter the issue list call by the volume id. As an example, Animal Man has an id of 3976. To get all the issues in this volume, make this issue filter call: http://www.comicvine.com/api/issues/?api_key=[API KEY]&filter=volume:3976

Additional benefit here of getting the image associated to the issue which the volume call did not have.

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#7 porkbun  Staff

@anville said:

Just to clarify with regards to the singular resource requiring a the type, is it correct that the only difference is prepending the type ID onto the resource ID?

So, instead of this:

http://beta.comicvine.com/api/<singular_resource>/<resource_id>/?api_key=API_KEY

it should be this?:

http://beta.comicvine.com/api/<singular_resource>/<type_id>-<resource_id>/?api_key=API_KEY

This is correct, except beta.comicvine.com/api is now api.comicvine.com.

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#8  Edited By comictagger

@frobie, filtering the "issues" that way makes a lot of sense. How long a grace period with the old way will we have?

Also, are you planning to deprecate the "search" resource? It's starting to seem redundant now that the filters are working, and was always a little weird. Again, if you are, how much time will we have to before it goes away?

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#9 porkbun  Staff

@comictagger: Grace period was about a day when cbanack brought up the bug. Leaving the search resource in because the filters can only match for exact case while the search is more robust.

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#10  Edited By comictagger

@frobie, maybe I misunderstand... Asking about the grace period, I meant "how long until the volume.issues structure goes away?" Are you saying tomorrow you'll remove it?

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#11 porkbun  Staff

@comictagger It was removed at site relaunch. The grace period was when the site was in beta.

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: a quick question:

Use page instead of offset to paginate through search results; extended search limit to 100

This is the case for search results, but not so when filtering issues: http://www.comicvine.com/api/issues/?api_key=[API KEY]&filter=volume:3976

When filtering issues, &page=2 does nothing, I still have to do &offset=100. Is this how you intend for things to be, or is it a just an oversight?

(Also I believe the "volume" resource still contains the "issues" field, at least in xml format.)

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#13  Edited By matthewlupo

Issues are returning for the volume resource under JSON as well. And I can confirm I'm having the &page=2 not working either, have to do the offset.

Of course, I see this as a good thing (having the issues pull with a volume resource) since this way I can get all issues (including +100 to display without having to do additional calls), and it also returns just the name of the issue (without the volume name and issue number, which brings me to my question...)

@frobie So since the name for an issue is concatenating the volume name and issue number, how would you recommend returning just the name? Do we manually have to parse that out?

On a side note, thank you for taking the time to answer all our questions, I'm sure things must be very busy with the site revamp. Things are looking good!

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#14 porkbun  Staff

@cbanack Page is only used to paginate through the search call because I am using the same method the site uses for search and it does not have a limit/offset option. The rest of the calls use offset/limit for pagination. I'll clean up the fields in the volume resource next week.

@matthewlupo The issue (pun unintended) with the issue name is that most of the issues do not have a name--of the 300k issues in the wiki, half do not have one. I can return just the issue name regardless if its empty if that is what everyone wants.

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#15 porkbun  Staff

@comictagger See my response to matthewlupo above. Let me know if y'all want to keep for format of the issue name as <volume name> #<issue number> - <issue title> or just <issue title>. Keep in mind that half the issues in the wiki do not have a title.

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: Given that volume name and issue number are already present in other fields, personally I'm in favour of just <issue title>, even if it's often just an empty string. If I want to construct a more meaningful title for those empty ones, I can easily build my own <volume name> #<issue_number>. However, my app already handles it fine either way, so I'm not really pressuring you to change it back or anything.

UNRELATED: if I wanted to obtain the 'issue' resource for a specific comic book, and the only information I have to start with is the volume id for that comic, and its issue_number, what's the most efficient (fewest hits on Comicvine API) way to do that? My app does it a lot, and right now I am: 1) querying for all issues filtered to the volume id (as you described), then 2) going through each issue and checking to see if it has the desired issue_number. For large volumes, this could mean hitting the database 5 or 6 times to page through all of the issues as I search for the correct issue_number. Probably less if I sort them so I look through the more recent ones first. But is there some way I can construct a single URL that takes me straight to the issue resource that that I want?

Thanks for taking some time to answer our questions! The API is looking great, and working quite well so far.

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#17  Edited By porkbun  Staff

@cbanack: I am surprised I did not add issue_number as a possible filter field. I'll do so next week. The final query would look something like this: http://www.comicvine.com/api/issues/?api_key=[API KEY]&filter=volume:3976,issue_number:3

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#18  Edited By cbanack

@frobie: awesome! that will *really* help me make my app more efficient.

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie I'm for the <issue title>, this way I can build my own title like @cbanack was mentioning, which is what I did before.

And thanks for the clarification on the page/offset. Is there going to be any way to pull all issues for a volume with a single call? That's what I used issues on the resource Volume. For instance, now the app will have to make 7 calls to pull all +700 of the Amazing Spider-Man issues, whereas before it only had to make one.

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: I can go either way with the issue title/name. I've already got a regular expression in place to fix it to remove the volume name and number, so whatever you do I am good with. (But when push comes to shove, I would prefer an empty string or None if there is no title for a given issue)

With regards to the filtering issues by volume ID and issue number, that sounds cool, and I would like to up the ante, so to speak. Would it be possible to filter by multiple volume IDs, and a single issue number? When my app does automatic cover matching, and it would be much more efficient to get all the relevant cover image URL issues in a single request.

P.S. After about 5 comments or so, I lose my forum posting privileges for the day. Is there any way to increase that amount? :-)

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#21 porkbun  Staff

My bad, it wasn't volumes that had issues removed, it was story arcs.

Avatar image for cbanack
cbanack

124

Forum Posts

199

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: looks like you added the issue_number as a filterable field yesterday. Just wanted to let you know I've been trying it out in my app, and it seems to be working perfectly. Even when filtering for issue numbers with unicode, like "5½". Cool.

Avatar image for comictagger
comictagger

39

Forum Posts

8

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#23  Edited By comictagger

@frobie Now testing out filtering of issues by multiple volumes, issue number and cover_date for my cover matching code. Way, way, more efficient! Thanks!

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#24  Edited By porkbun  Staff

List of fixes that went live earlier today:

  • issue_number is a filterable field
  • any date field filter will behave like the cover_date and store_date filter
  • name in issues returns the issue name regardless if its empty
  • per @comictagger request, the volume field in the issues call accepts multiple ids: http://api.comicvine.com/issues/?api_key=[API KEY]&filter=volume:1487|1489,issue_number:14&format=json)

@matthewlupo: The issues are back in the volume call; timeout issues may occur for volumes with issues greater than 1000. I would still recommend using the issues call with a filter on volume to get more details.

Avatar image for matthewlupo
matthewlupo

29

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie Ahh, gotcha. Sounds good. I'll work on transitioning it over. As you mentioned, it'll be handy to have more details about the issue like the issue image.

Thanks to all for all the updates!

Avatar image for sorrentmutie
sorrentmutie

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I just want to thank you for the great job you're doing. I'm testing the beta API and the results seem very promising.

Salvatore

Avatar image for sorrentmutie
sorrentmutie

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#27  Edited By sorrentmutie
Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#28  Edited By porkbun  Staff

@sorrentmutie: Yes, the issues call does not have person_credits or character_credits as available fields. You would need to make an issue call to get more details.

Avatar image for sorrentmutie
sorrentmutie

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@frobie: ok, no problem.

I have another related question. When I query an isse, the returning xml is the following:

- <person_credits>

- <person><api_detail_url> <![CDATA[ http://www.comicvine.com/api/person/4040-36747/]]></api_detail_url>

<id>36747</id> <name><![CDATA[ Christopher Rule]]></name>

<site_detail_url><![CDATA[ http://www.comicvine.com/christopher-rule/4040-36747/]]></site_detail_url>

</person>

<role><![CDATA[ artist]]></role>

<person>

etc etc etc

The role tag is outside the person. Am I doing something wrong, or this output is correct?

Salvatore

Avatar image for porkbun
porkbun

61

Forum Posts

533

Wiki Points

0

Followers

Reviews: 1

User Lists: 2

#30 porkbun  Staff

It's a bug, will have a fix in to release this coming week.

Avatar image for sorrentmutie
sorrentmutie

7

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Avatar image for codenutz
codenutz

6

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

If anyone is interested I created a fork of the SharpComicVine library on GitHub to make it a portable class library: https://github.com/mattwhetton/SharpComicVine

I also packaged this up into a NuGet package: http://www.nuget.org/packages/SharpComicVine/

Avatar image for adrianrodriguez
adrianrodriguez

16

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Is this API still kept up and updated?

Avatar image for lapotchkin
lapotchkin

25

Forum Posts

16808

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#36  Edited By lapotchkin

Is API available now?

Avatar image for grzgajda
GrzGajda

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

Hi,

everybody who uses PHP and want to use ComicVine API in your project. I prepared a simple class wrapper: grz-gajda/comicvine-api. Class is under MIT license so feel free to use it.

https://github.com/grz-gajda/comicvine-api

https://packagist.org/packages/grzgajda/comicvine-api

Avatar image for khael123khaelp
Khael123khaelp

3

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

Hello,

I am trying to make the following query: "https://comicvine.gamespot.com/api/characters/?api_key={tu apikey}&format=json&filter=publisher.name:Marvel&limit=10"but the filter "publiser.name: Marvel" does not work. I don't want to use "https://comicvine.gamespot.com/api/publisher/4010-10/?api_key={YOUR_API_KEY_HERE}&format=json" because it brings a lot of arrays inside results.